package com.example.studentsRoom.util;

import com.example.studentsRoom.vo.ResultVo;

public class ResultUtil {
    public static ResultVo success(Object obj){
        ResultVo resultVo=new ResultVo<>();
        resultVo.setCode(0);
        resultVo.setData(obj);

        return resultVo;
    }

    public static ResultVo failed(){
        ResultVo resultVo=new ResultVo<>();
        resultVo.setCode(-1);

        return resultVo;
    }
}
